<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

    <script src="js/Mixin模式示例3.js"></script>
    <script>
        // Create a new Car
        var myCar = new Car({
            model: "Ford Escort",
            color: "blue"
        });
        // Test to make sure we now have access to the methods
        myCar.driveForward();
        myCar.driveBackward();
        // Outputs:
        // drive forward
        // drive backward
        // We can also augment Car to include all functions from our mixin
        // by not explicitly listing a selection of them
        augment(Car, Mixin);
        var mySportsCar = new Car({
            model: "Porsche",
            color: "red"
        });
        mySportsCar.driveSideways();
        // Outputs:
        // drive sideways

    </script>
</body>
</html>